1 using UnityEngine;
2
3 namespace
ProceduralToolkit.Examples.Primitives
4 {
5     
[RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))]
6     
public class FlatSphere : MonoBehaviour
7     {
8         
public float radius = 1f;
9         
public int horizontalSegments = 16;
10         
public int verticalSegments = 16;
11
12         
private void Start()
13         {
14             GetComponent<MeshFilter>().mesh = MeshE.FlatSphere(radius, horizontalSegments, verticalSegments);
15         }
16     }
17 }


Gõ tìm kiếm nhanh...